package com.ndp.fb.enums.adresource;

import lombok.Getter;

/**
 * @Author: Evan on 1/18/2016  18:28.
 * Email: evan.wan@ndpmedia.com
 */
@Getter
public enum AdCreativeType {

    ADIMAGE(1),

    ADVIDEO(2),

    ADCAROUSEL(4);

    private int type;

    AdCreativeType(int type) {
        this.type = type;
    }

    /**
     * 根据type获取checkActive
     *
     * @param type type
     * @return CheckActive
     */
    public static AdCreativeType getAdCreativeType(int type) {
        for (AdCreativeType c : AdCreativeType.values()) {
            if (c.type == type) {
                return c;
            }
        }
        return null;
    }
}
